<cfcomponent displayname="Application" output="false">
	
	<cfscript>
		this.name = 'MAXDemo';
		this.sessionManagement = true;
		this.sessionTimeout = createTimeSpan(0,0,20,0);
	</cfscript>
	
	<cffunction name="onApplicationStart" returnType="boolean" output="false">
		
		<cfscript>
			//application constants
			application.photoCache = [];
			
			return true;
		</cfscript>
		
	</cffunction>

	<!--- Run before the request is processed --->
	<cffunction name="onRequestStart" returnType="boolean" output="false">
		<cfargument name="thePage" type="string" required="true">
		
		<cfscript>
			if ( structKeyExists(url, 'flush') ) {
				onApplicationStart();
				onSessionStart();
			}
		</cfscript>
		
		<cfreturn true>
	</cffunction>

</cfcomponent>